







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Returns a View collection that can be used for enumerating the items in the bag in
reversed order.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public OrderedBag<T>.OrderedBag<(Of <T>)>..::View Reversed() |
Visual Basic (Declaration) |
---|
Public Function Reversed As OrderedBag<(Of <T>)>..::View |
Visual C++ |
---|
public: OrderedBag<(Of <T>)>..::View^ Reversed () |
Return Value
An OrderedBag.View of items in reverse order.
Remarks
Typically, this method is used in conjunction with a foreach statement. For example:
![]() | |
---|---|
foreach(T item in bag.Reversed()) { // process item } |
If an item is added to or deleted from the bag while the View is being enumerated, then the enumeration will end with an InvalidOperationException.
Calling Reverse does not copy the data in the tree, and the operation takes constant time.
See Also
OrderedBag<(Of <T>)> Class
Wintellect.PowerCollections Namespace